var Attendance = function() {
    var Init = function() {
        $('.date-picker').datepicker({
            rtl: Metronic.isRTL(),
            language: 'vi',
            autoclose: true
        });
    }

    var Filter = function() {
        $('select,input:text', '.filter-bar').change(function() {
            $.ajax({
                url: $('.url-data').val(),
                type: 'post',
                data: $('select,input:text', '.filter-bar').serializeArray()
            }).done(function(response) {
                $('.table-content').html(response);
            }).fail(function() {
                //alert('Check Your Connection.');
            });

        }).first().trigger('change');
    }

    return {
        init: function() {
            Init();
            Filter();
        }

    };

}();